<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	this.imagePreview = function(){	
	xOffset = 10;
	yOffset = 30;
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' width='200' height='150' />"+ c +"</p>");			
		$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").fadeIn("fast");						
    	},
	function(){
		this.title = this.t;	
		$("#preview").remove();
    	});	
	$("a.preview").mousemove(function(e){
		$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px");
	});			
};
$(document).ready(function(){
	imagePreview();
});
</script>
<style>
#preview{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
	}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Colony PCR Confirm D</title>
</head>
<body>
<table width = "100%" bgcolor="#DBF3FF">
	<tr>
		<td width="70%">
			Colony PCR Confirm D
		</td>
		<td width="10%">
		 	<s:form action="GeneColonyHistory">
				<s:hidden value="%{geneName}" name="geneName" />
				<s:hidden value="D" name="type" />
				<s:submit value="history"/>
			</s:form>
		</td>
		<td width="10">
			<s:form action="emergencyReport" id="emergencyReportColonyD">
			<s:hidden value="%{geneName}" name="geneName" />
			<s:hidden value="Colony PCR Confirm D" name="formName"/>
			<input type="button" value="report" onclick="reportEmergencyColonyD()"/>
			</s:form>
		</td>
	</tr>
</table>
<center>
Genename:<s:property value="geneName"/>
</center>
<s:form action="updateGeneColony" id="updateGeneColonyD">
<table>
<tr><td><s:textfield label="Gene primer #1" name="pno1"></s:textfield></td></tr>
<tr><td><s:textfield label="Gene primer #2" name="pno2"></s:textfield></td></tr>
<s:if test='esize == 0'><tr><td><s:textfield label="Expected size (bp)" name="esize" value=""/></td></tr></s:if>
<s:else><tr><td><s:textfield label="Expected size (bp)" name="esize"/></td></tr></s:else>
</table>

<table width=100%>
	<tr>
	<td width="25%">
		<table>
			<tr>
				<td><s:textfield label="100-104 Date" name="date1"></s:textfield>
				</td>
			</tr>
		</table>
	</td>
	<td width="25%">
		<table>
			<tr>
				<td><s:textfield label="105-109 Date" name="date2"></s:textfield>
				</td>
			</tr>
		</table>
	</td>
	<td>
		<table>
			<tr>
				<td><s:textfield label="110-119 Date" name="date3"></s:textfield>
				</td>
			</tr>
		</table>
	</td>
	</tr>
</table>
<table width="100%">
<tr>
<td>
<table width="80%"  borderColor="#E0E0E0" border="0" style="BORDER-COLLAPSE: collapse">
	<tr><td><s:radio label="100" name="z100" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="101" name="z101" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="102" name="z102" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="103" name="z103" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="104" name="z104" list="{'yes','no'}" /></td></tr>
</table>
</td>
<td>
<table width="80%"  borderColor="#E0E0E0" border="0" style="BORDER-COLLAPSE: collapse">
	<tr><td><s:radio label="105" name="z105" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="106" name="z106" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="107" name="z107" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="108" name="z108" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="109" name="z109" list="{'yes','no'}" /></td></tr>
</table>
</td>
<td>
<table width="80%"  borderColor="#E0E0E0" border="0" style="BORDER-COLLAPSE: collapse">
	<tr><td><s:radio label="110" name="z110" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="111" name="z111" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="112" name="z112" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="113" name="z113" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="114" name="z114" list="{'yes','no'}" /></td></tr>
</table>
</td>
<td>
<table width="80%"  borderColor="#E0E0E0" border="0" style="BORDER-COLLAPSE: collapse">
	<tr><td><s:radio label="115" name="z115" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="116" name="z116" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="117" name="z117" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="118" name="z118" list="{'yes','no'}" /></td></tr>
	<tr><td><s:radio label="119" name="z119" list="{'yes','no'}" /></td></tr>
</table>
</td>
</tr>
</table>
<s:hidden name="geneName" value="%{geneName}" />
<s:hidden name="type" value="D" />
<center>
<table>
	<tr>
		<td align="center">
			<input type="button" value="update" onclick="updateColonyD()"/>
		</td>
	</tr>
</table>
</center>
</s:form>
<center>
	<p></p> 
	<table width="50%">
		<tr bgcolor="#DBF3FF">
		<td>Date Uploaded</td>
		<td>Uploader</td>
		<td>File Name</td>
		<td>Option</td>
		</tr> 
		<s:iterator value="imageList">
        <tr bgcolor="#E1EBED">
        	<td width="28%"><s:date name="dateModified" format="MM/dd/yyyy hh:mm:ss a"/></td>
        	<td width="15%"><s:property value = "user.userName"/></td>
        	<td><a href="<s:url action = "ViewImage"><s:param name = "id"><s:property value="id"/></s:param></s:url>"><s:property value= "fileName"/></a></td>
          	<td><a href="upload/<s:property value="fileName"/>" class="preview" >Preview</a>      
        </tr>
        </s:iterator>       
   </table>   
<br>
</center>
</body>
</html>